<include file="application/admin/view/public/left.html"/>
<script type="text/javascript">
    
    $('.treenew li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');
    function getsuser(ob) {
    	// alert(123)
    	if($(ob).children('#adimg').attr('src') == "__PUBLIC__/app/admin/images/add.png"){
    		$(ob).children('#adimg').attr('src',"__PUBLIC__/app/admin/images/minus.png")
    	}else{
    		$(ob).children('#adimg').attr('src',"__PUBLIC__/app/admin/images/add.png")
    	}

        var children = $(ob).parent('li.parent_li').find(' > ul > li');
        if (children.is(":visible")) {
            children.hide('fast');
            $(ob).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-sign').removeClass('icon-minus-sign');
        } else if( $(ob).attr("index") == 1 ){
        	children.show('fast');
        	return false;
        }else {
            children.show('fast');
            $(ob).attr('index','1');

			var asd=$(ob).find("em").text();
			// alert(asd);
			var url = "{:U('Member/getInivt')}"
			var ob = $(ob);
				$.post(url,{'username':asd},function(msg){
					if(msg.status==1){
						
						ob.attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-sign').removeClass('icon-plus-sign');
						var str = "<ul>"
						for(var i=0;i<msg.user.length;i++){
							str += " <li class='parent_li' ><span class='tree' onclick='getsuser(this);'  data-key='on'><img src='__PUBLIC__/app/admin/images/add.png' id='adimg'/><img src='__PUBLIC__/app/admin/images/head2.png' /><em class='account'>"+msg['user'][i]['loginName']+"</em> - 注册日期："+msg['user'][i]['add_time']+"(团队业绩:"+msg['user'][i]['yeji']+"，直推人数:"+msg['user'][i]['num']+")</span></li>";
						}
						str += "</ul>";
						ob.after(str);
					}else{
						alert('无下线会员');
					}
				})
          
        }
        // $(ob).stopPropagation();
    }

</script>
<style>
	  	.icon1{width:20px !important;
			   height:20px !important;
			   background-image:url(__PUBLIC__/app/admin/images/add.png);
			   background-repeat:no-repeat;
			   background-position:center;
			   float:left;
			   line-height: 35px;
			   margin-top:6px;
		}
		.icon2{width:20px !important;
			   height:20px !important;
			   background-image:url(__PUBLIC__/app/admin/images/reduce.png);
			   background-repeat:no-repeat;
			   background-position:center;
			   float:left;
			   line-height: 35px;
			   margin-top:6px;
		}
      	.tree{ cursor:pointer;}
		.td{ height:35px; line-height:35px; text-align:left; padding-left:100px}
		.treenew {
		    min-height:20px;
		    padding:19px;
		    margin-bottom:20px;
		    background-color:#fbfbfb;
		    border:1px solid #ccc;
		    -webkit-border-radius:4px;
		    -moz-border-radius:4px;
		    border-radius:4px;
		    -webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);
		    -moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);
		    box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05)
		}
		.treenew li {
		    list-style-type:none;
		    margin:0;
		    padding:10px 5px 0 5px;
		    position:relative
		}
		.treenew li::before, .treenew li::after {
		    content:'';
		    left:-20px;
		    position:absolute;
		    right:auto
		}
		.treenew li::before {
		    border-left:1px solid #999;
		    bottom:50px;
		    height:100%;
		    top:0;
		    width:1px
		}
		.treenew li::after {
		    border-top:1px solid #999;
		    height:20px;
		    top:25px;
		    width:25px
		}
		.treenew li span {
		    -moz-border-radius:5px;
		    -webkit-border-radius:5px;
		    border:1px solid #999;
		    border-radius:5px;
		    display:inline-block;
		    padding:3px 8px;
		    text-decoration:none
		}
		.treenew li.parent_li>span {
		    cursor:pointer
		}
		.treenew>ul>li::before, .treenew>ul>li::after {
		    border:0
		}
		.treenew li:last-child::before {
		    height:25px
		}
		.treenew li.parent_li>span:hover, .treenew li.parent_li>span:hover+ul li span {
		    background:#eee;
		    border:1px solid #94a0b4;
		    color:#000
		}
		.treenew ul{
		    display: block;
		    list-style-type: disc;
		    //-webkit-margin-before: 1em;
		    //-webkit-margin-after: 1em;
		    -webkit-margin-start: 0px;
		    -webkit-margin-end: 0px;
		    -webkit-padding-start: 40px;
}
      </style>
<div id="dcMain">
   <!-- 当前位置 -->
<div id="urHere">管理中心<b>></b><strong>推广系谱</strong> </div>   
	<div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
        
    <div class="filter">
    <form action="{:url('Member/tuijian')}" method="post">
    	<!-- <form action="/index.php/admin/Member/tuijian" method="post"> -->
     会员账号:<input name="username" type="text" placeholder="会员编号" class="inpMain" value="" size="20" />
     	<input type="hidden" name="action" value="query">
     <input name="submit" class="btnGray" type="submit" value="搜索" />
    </form> 
    </div>
    <div id="list">
    	<div class="result-wrap">

            <div class="treenew well">
			    <ul>
			        <li class="parent_li">
						<span class="tree" onclick="getsuser(this);" data-key="on">
							<img src="__PUBLIC__/app/admin/images/add.png" id="adimg"/><img src="__PUBLIC__/app/admin/images/head2.png" /><em class="account">{$user.loginName}</em> - 注册日期：{$user.add_time}(团队业绩：{$user.yeji}，直推人数:{$user.num})</span>

			           <!--  <span><img src="__PUBLIC__/admin/images/add.png"/><img src="__PUBLIC__/admin/images/minus.png"/><img src="__PUBLIC__/admin/images/head2.png" /> Parent </span> <a href="">Goes somewhere</a> -->
			            <!-- <ul>
			                <li>
			                	<span><i class="icon-minus-sign"></i> Child</span> <a href="">Goes somewhere</a>
			                    <ul>
			                        <li>
				                        <span><i class="icon-leaf"></i> Grand Child</span> <a href="">Goes somewhere</a>

			                        </li>
			                        <li>
				                        <span><i class="icon-leaf"></i> Grand Child</span> <a href="">Goes somewhere</a>

			                        </li>
			                    </ul>
			                </li>
			                <li>
			                	<span><i class="icon-minus-sign"></i> Child</span> <a href="">Goes somewhere</a>
			                </li>
			            </ul> -->
			            
			      
			        </li>
			        
			    </ul>
              </div>

        </div>
    </div>
    <div class="clear"></div>
    <div class="pager">
        <ul>{$page}</ul>
    </div>
    </div>
 </div>
 <div class="clear"></div>
<include file="application/admin/view/public/foot.html"/><!-- dcFooter 结束 -->
<div class="clear"></div></div>
<script type="text/javascript">

onload = function()
{
 document.forms['action'].reset();
}

function douAction()
{
 var frm = document.forms['action'];
 frm.elements['new_cat_id'].style.display = frm.elements['action'].value == 'category_move' ? '' : 'none';
}

</script>
</body>
</html>











